import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 待销毁旧件列表查询
// export const getListByPage = params => axios.post(`${SERVER.CLAIMDEALER}/rPDestory/getListByPage`,  params );

// 选择销毁旧件列表
export const getDestoryListByPage = params => axios.post(`${SERVER.CLAIMDEALER}/rPCmsClaim/getPreDestoryListByPage`,  params );

// // 旧件销毁新增
// export const saveOne = params => axios.post(`${SERVER.CLAIMDEALER}/rPDestory/saveOne`,  params );

// // 旧件销毁申请
// export const applyDestory = params => axios.post(`${SERVER.CLAIMDEALER}/rPDestory/applyDestory`,  params );
//
// // 编辑
// export const edit = params => axios.get(`${SERVER.CLAIMDEALER}/rPDestory/selectById/${params}`);
//
// // 旧件销毁更新
// export const updateByPtId = params => axios.post(`${SERVER.CLAIMDEALER}/rPDestory/updateByPtId`,  params );
//
export const excelExport = params => {
  return axios({
    url:`${SERVER.CLAIMDEALER}/rPCmsClaim/getPreDestoryListForExport`,
    method: 'POST',
    data: params,
    responseType: 'blob'
  });
};

  //下载中心导出
  export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);

// 删除客户订单(物理删除)
// export const deleteOrders = params => axios.post(`${SERVER.CYXDMS_RETAIL}/ordermanage/customerOrders/delete`, { params });


